1. Field of the Invention
The present invention relates generally to methods and apparatuses for detecting system configuration errors within a network, and more specifically, to methods and apparatuses for detecting unidirectional links between devices configured for communication with one another in the network.
2. Description of the Related Art
In a network of coupled devices, or a collection of such networks, devices are arranged for two-way communication with neighboring devices to send frames to and receive frames from the neighboring devices. A one-way (unidirectional) connection between devices may result from a faulty transmitting or receiving line, miswiring of fiber strands (FIG. 1), port interface malfunctions (FIG. 2), or physical media converter failures, for example. A single unidirectional error between two devices can lead to errors such as spanning tree loops, which may affect the entire network.
An example of a unidirectional connection is shown in FIG. 1. The transmitting line TX correctly goes from device X to device Y. The receiving line, however, is miswired. Rather than providing a communication link directly from device Y to device X, the receiving line goes from device Y to device Z and then through device Z to device X. In this configuration, each device can properly send a packet to a neighboring device but it cannot receive a packet from the same device to which it transmitted the packet. This lack of mutual identification among the neighboring devices can result in an incorrect assumption by the transmitting device that the transmitter and receiver at the other end are in two-way communication. This type of miscommunication can lead to problems in the operation of the spanning tree protocol and generate a flooding of packets on the network.
Network systems typically check for miswiring or unidirectional problems at the physical layer of an OSI (Open Systems Interconnection) reference model. The physical layer defines the actual physical components such as connectors and cables. A unidirectional link test at the physical layer only checks for open lines or port malfunctions and would not detect a miswired system as shown in FIG. 1. One example of a physical layer unidirectional check is an auto-negotiation start-up protocol. In operation, a local device begins the test by transmitting its link code word with an acknowledge bit not set. Once three consecutive, consistent link code words have been received at the local device, the auto-negotiation system looks for three consecutive, consistent link code words which have the acknowledge bit set to 1. After a period of time the auto-negotiating system is then able to transmit and receive data, assuming the partner device also received three consecutive, consistent link code words followed by three consecutive, consistent link code words with the acknowledge bit set to 1. If the start-up protocol does not succeed, no communication is established between the neighbors.
As can be observed from the above description, the auto-negotiation protocol only checks whether the device receives an acknowledgement back after transmitting data. It does not identify the device from which it received the acknowledgement or confirm that the device the data was received from and the device the original link code word was transmitted to, are the same device, since the physical layer has no addressing. In the example of the miswired network shown in FIG. 1, no error would be detected at the physical layer since each line is connected to a computer at the input and output ports with a continuous link from the output port of device Y to the input port of device X, even though it is through a separate device. As discussed above, this type of unidirectional error can lead to malfunctions in critical system protocols.
There is, therefore, a need for a unidirectional link detection protocol which provides for the identification of logical one-way miscommunication between neighbors even when the physical layer has identified the transmission media as bidirectional.
The present invention provides a method and system for detecting one-way communication between devices configured for communication with one another in a network.
A method of one aspect of the present invention is for testing a primary device for two-way communication between the primary device and one or more other devices in communication therewith in a network. The method includes receiving a packet containing an originating device identifier at the primary device; adding a primary device identifier to the packet; transmitting the packet containing the originating device identifier and the primary device identifier from the primary device; and receiving a reply packet and detecting two-way communication if the reply packet contains the originating device identifier and the primary device identifier.
A system of one aspect of the present invention generally comprises a receiver operable to receive a probe message containing an originating device identifier; a message generator operable to generate an echo message with the originating device identifier and a primary device identifier; and a transmitter operable to transmit the echo message containing the originating device identifier and the primary device identifier. The system further comprises a detector operable to receive a reply message and detect whether the reply message contains the originating device identifier and the primary device identifier to determine if the primary device is in two-way communication with devices coupled thereto in the network.
In one embodiment, the messages are transmitted and received across a data link layer. The primary device may also include a cache table for storing the originating device identifier. The cache table is used to provide an up to date list of neighboring devices in communication with the primary device. Preferably, the system runs continuously for early detection of failures in the communication links of the network.
The system may be configured to identify not only a unidirectional link condition between two devices, but also the specific type of error in the system, such as a transmitting/receiving loop or a neighbor mismatch error. The system may also generate and send an error message to the primary device user, network management, or both.
The above is a brief description of some deficiencies in the prior art and advantages of the present invention. Other features, advantages, and embodiments of the invention will be apparent to those skilled in the art from the following description, drawings and claims.